package cn.johnyu.books.controller;

import cn.johnyu.books.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
//@CrossOrigin(origins = "*",allowedHeaders = "*")
@RestController
public class BookController {
    @Autowired
    private BookService bookService;
    @GetMapping("/books")
    public String findAllBooks(){
        return bookService.findAllBooks();
    }
}
